//
//  Ext+UIImageView.swift
//  HMSlender
//
//  Created by 赵少朋赵少朋 on 2017/2/4.
//  Copyright © 2017年 ITheima. All rights reserved.
//

import UIKit
import SDWebImage

extension UIImageView {

    convenience init(imgName:String) {
        
        self.init()
        
        self.image = UIImage(named: imgName)
    }
    
    
//    func hm_setImage(imgUrl:URL, placeholderImage:UIImage) -> Void {
    
//        self.sd_setImage(with: imgUrl, placeholderImage: placeholderImage)
        
//    }
    
    func hm_setImage(imgString:String?) -> Void {
        
        self.sd_setImage(with: URL(string:imgString ?? ""), placeholderImage: self.image)
    }
}
